package com.iwuke.dance.wallet.e_coin.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.iwuke.dance.R;
import com.iwuke.dance.util.GlideUtil;
import com.iwuke.dance.wallet.bean.ECoinPurposeBean;

import java.util.List;

import androidx.annotation.NonNull;

/**
 * @author: 魏从响
 * @date: 2025/9/17
 */
public class ECoinPurposeAdapter extends BaseQuickAdapter<ECoinPurposeBean, BaseViewHolder> {

    private final Context context;

    public ECoinPurposeAdapter(Context context, int eCoinPurpose, List<ECoinPurposeBean> list) {
        super(eCoinPurpose, list);
        this.context = context;
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, ECoinPurposeBean s) {

        ImageView img_public = baseViewHolder.findView(R.id.img_public);
        TextView tv_gift = baseViewHolder.findView(R.id.tv_gift);
        TextView tv_desc = baseViewHolder.findView(R.id.tv_desc);

        GlideUtil.setImageView(context,s.item_image,img_public);
        tv_gift.setText(s.item_title);
        tv_desc.setText(s.desc_title);

    }
}
